//
//  BBTextFieldViewModel.h
//  BBKit
//
//  Created by apple on 2019/6/28.
//  Copyright © 2019年 baobao. All rights reserved.
//

#import "BBBaseViewModel.h"

NS_ASSUME_NONNULL_BEGIN

@interface BBTextFieldViewModel : BBBaseViewModel
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ text)(NSString *text);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ attributedText)(NSAttributedString *attributedText);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ font)(UIFont *font);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ textColor)(UIColor *textColor);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ textAlignment)(NSTextAlignment textAlignment);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ borderStyle)(UITextBorderStyle borderStyle);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ defaultTextAttributes)(NSDictionary *defaultTextAttributes);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ placeholder)(NSString *placeholder);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ attributedPlaceholder)(NSAttributedString *attributedPlaceholder);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ keyboardType)(UIKeyboardType keyboardType);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ clearsOnBeginEditing)(BOOL clearsOnBeginEditing);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ adjustsFontSizeToFitWidth)(BOOL adjustsFontSizeToFitWidth);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ minimumFontSize)(CGFloat minimumFontSize);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ delegate)(id<UITextFieldDelegate> delegate);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ background)(UIImage *background);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ disabledBackground)(UIImage *disabledBackground);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ allowsEditingTextAttributes)(BOOL allowsEditingTextAttributes);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ typingAttributes)(NSDictionary *typingAttributes);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ clearButtonMode)(UITextFieldViewMode clearButtonMode);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ leftView)(UIView *leftView);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ leftViewMode)(UITextFieldViewMode leftViewMode);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ rightView)(UIView *rightView);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ rightViewMode)(UITextFieldViewMode rightViewMode);

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ inputView)(UIView *inputView);
@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ inputAccessoryView)(UIView *inputAccessoryView);

/*
 @pragm controlEvents
 
 UIControlEventEditingDidBegin                                   = 1 << 16,     // UITextField
 UIControlEventEditingChanged                                    = 1 << 17,
 UIControlEventEditingDidEnd                                     = 1 << 18,
 UIControlEventEditingDidEndOnExit                               = 1 << 19,     // 'return key' ending editing
 */

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ eventBlock)(UIControlEvents controlEvents, void (^eventBlock)(id sender));

@property(nonatomic,strong,readonly) BBTextFieldViewModel *(^ enabled)(BOOL enable);
@end

NS_ASSUME_NONNULL_END
